package factions;

import org.bukkit.Bukkit;
import org.bukkit.Chunk;

public class Land {
	private final int world;
	private final int x;
	private final int z;
	private final Chunk chunk;
	
	public Land(int world, int x, int z) {
		this.world = world;
		this.x = x;
		this.z = z;
		chunk = Bukkit.getWorlds().get(world).getChunkAt(x, z);
	}
	
	public String serialize(String faction) {
		String update = "INSERT INTO faction land (faction, world, x, z) VALUES (";
		update = update + faction + ", " + world + ", " + x + ", " + z + ")";
		return update;
	}
	
	public boolean check(Chunk chunk) {
		return this.chunk.equals(chunk);
	}

}
